<template>
  <div id="home">
    <el-container class="page-container">
      <el-aside width="auto">
        <Aside />
      </el-aside>
      <router-view></router-view>
    </el-container>
  </div>
</template>

<script>
import Aside from "@/components/main/Aside";
export default {
  name: "Home",
  components: {
    Aside
  },
  created() {
    let token = this.$store.state._token;
    if (!token) {
      this.$router.push({ name: "login" });
    }
  }
};
</script>

<style lang="scss">
#home {
  background: #f2f2f2;
  .page-container {
    height: 100vh;
    overflow: hidden;
  }
  color: #333;
}
</style>
